﻿using System;

namespace Teigha.Core
{
	public class OdGiCommonDraw_Internal : OdGiCommonDraw
	{
		public OdGiCommonDraw_Internal(IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
		{
		}

		public override OdGiRegenType regenType()
		{
			return (OdGiRegenType)GlobalsPINVOKE.OdGiCommonDraw_regenType(OdGiCommonDraw.getCPtr(this));
		}

		public override bool regenAbort()
		{
			return GlobalsPINVOKE.OdGiCommonDraw_regenAbort(OdGiCommonDraw.getCPtr(this));
		}

		public override OdGiSubEntityTraits subEntityTraits()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiCommonDraw_subEntityTraits(OdGiCommonDraw.getCPtr(this));
			return new OdGiSubEntityTraits_Internal(cPtr, false);
		}

		public override OdGiGeometry rawGeometry()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiCommonDraw_rawGeometry(OdGiCommonDraw.getCPtr(this));
			return new OdGiGeometry_Internal(cPtr, false);
		}

		public override bool isDragging()
		{
			return GlobalsPINVOKE.OdGiCommonDraw_isDragging(OdGiCommonDraw.getCPtr(this));
		}

		public override double deviation(OdGiDeviationType deviationType, OdGePoint3d pointOnCurve)
		{
			return GlobalsPINVOKE.OdGiCommonDraw_deviation(OdGiCommonDraw.getCPtr(this), (int)deviationType, OdGePoint3d.getCPtr(pointOnCurve));
		}

		public override uint numberOfIsolines()
		{
			return GlobalsPINVOKE.OdGiCommonDraw_numberOfIsolines(OdGiCommonDraw.getCPtr(this));
		}

		public override OdGiContext context()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdGiCommonDraw_context(OdGiCommonDraw.getCPtr(this));
			OdGiContext result = new OdGiContext_Internal(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}
	}
}
